package org.tacademy.and12.zlistview;

import android.os.Parcel;
import android.os.Parcelable;

public class MyData implements Parcelable{

	public int imageId;
	public String name;
	public String phone;
	
	public MyData(int imageId, String name, String phone) {
		this.imageId = imageId;
		this.name = name;
		this.phone = phone;
	}
	
	public MyData(Parcel src){
		imageId = src.readInt();
		name = src.readString();
		phone = src.readString();
	}
	
	
	public static Parcelable.Creator CREATOR = new Creator() {

		@Override
		public Object createFromParcel(Parcel in) {
			// TODO Auto-generated method stub
			return new MyData(in);
		}

		@Override
		public Object[] newArray(int size) {
			// TODO Auto-generated method stub
			return null;
		}
		
	};
	

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeInt(imageId);
		dest.writeString(name);
		dest.writeString(phone);
	}

}
